﻿@model SelfMadeMillionaire.Web.Infrastructure.ViewModels.Account.ChangePasswordViewModel

@{
	ViewBag.Title = "Change Password";
}

<h4 class="admin_container_ttile">Change Password</h4>

<div class="admin_container_body">

	<div class="biography_container">

		<!--change password block-->
		<div style="margin-top: 20px;">
			@using (Html.BeginForm("ChangePassword", "Profile", FormMethod.Post, new { @class = "form-horizontal" }))
   {
				<div class="login_block personal_info_block">
					<div class="form-group">
						<label for="firstName" class="col-sm-5 control-label custom_label">New Password:</label>
						<div class="col-sm-7">
							@Html.PasswordFor(m => m.Password, new { @class = "form-control", placeholder = "Enter New password" })
							@Html.ValidationMessageFor(m=>m.Password)
						</div>
					</div>

					<div class="form-group">
						<label for="firstName" class="col-sm-5 control-label custom_label">Confirm Password:</label>
						<div class="col-sm-7">
							@Html.PasswordFor(m => m.ConfirmPassword, new { @class = "form-control", placeholder = "Enter Confirm password" })
							@Html.ValidationMessageFor(m=>m.ConfirmPassword)
						</div>
					</div>
					<div class="form-group">
						<label for="firstName" class="col-sm-5 control-label custom_label">&nbsp;</label>
						<div class="col-sm-7">
							<div class="newsletter_search_btn">
								<button type="submit" class="btn btn-primary">&nbsp;&nbsp;&nbsp;Ok&nbsp;&nbsp;&nbsp;</button>
								<a href="@Url.Action("Index", "Profile")" class="btn btn-primary">Cancel</a>
							</div>
						</div>
						@if ((Model != null) && Model.IsSuccess)
					    {
                        
							<div class="modal fade" id="success-dialog" tabindex="-1" role="dialog" aria-labelledby="add-dialog-label" aria-hidden="true">
								<div class="modal-dialog">
									<div class="modal-content">

										<div class="modal-header">
											<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
											<h4 class="modal-title" id="success-dialog-label">Change password</h4>
										</div>
										<div class="modal-body">
											@Html.Raw("Updated Successfully.")
										</div>
										<div class="modal-footer">
											<div class="row">
												<div class="col-sm-12">
													<div class="pull-right">
														<a href="#" class="btn btn-default width80" data-dismiss="modal">OK</a>
													</div>
												</div>
											</div>

										</div>
										<!-- /.modal-content -->
									</div>
									<!-- /.modal-dialog -->
								</div>
							</div>
							<script type="text/javascript">
							    $(function () {
							        $("#success-dialog").modal();
							        $("input[type='text']").val('');
							    });
							</script>
                      
                    }
					</div>
				</div>
   }
		</div>

	</div>
</div>
